import 'package:flutter/material.dart';
import 'package:hxdj/common/colors/my_colors.dart';
import 'package:hxdj/common/components/my_dimens.dart';

/// 间隔
/// 官方做法：https://github.com/flutter/flutter/pull/54394
class MyGaps {
  
  /// 水平间隔
  static  Widget hGap4 = SizedBox(width: MyDimens.gapDp4);
  static  Widget hGap5 = SizedBox(width: MyDimens.gapDp5);
  static  Widget hGap8 = SizedBox(width: MyDimens.gapDp8);
  static  Widget hGap10 = SizedBox(width: MyDimens.gapDp10);
  static  Widget hGap12 = SizedBox(width: MyDimens.gapDp12);
  static  Widget hGap15 = SizedBox(width: MyDimens.gapDp15);
  static  Widget hGap16 = SizedBox(width: MyDimens.gapDp16);
  static  Widget hGap32 = SizedBox(width: MyDimens.gapDp32);
  
  /// 垂直间隔
  static  Widget vGap4 = SizedBox(height: MyDimens.gapDp4);
  static  Widget vGap5 = SizedBox(height: MyDimens.gapDp5);
  static  Widget vGap8 = SizedBox(height: MyDimens.gapDp8);
  static  Widget vGap10 = SizedBox(height: MyDimens.gapDp10);
  static  Widget vGap12 = SizedBox(height: MyDimens.gapDp12);
  static  Widget vGap15 = SizedBox(height: MyDimens.gapDp15);
  static  Widget vGap16 = SizedBox(height: MyDimens.gapDp16);
  static  Widget vGap24 = SizedBox(height: MyDimens.gapDp24);
  static  Widget vGap32 = SizedBox(height: MyDimens.gapDp32);
  static  Widget vGap50 = SizedBox(height: MyDimens.gapDp50);
  
 static Widget line = const SizedBox(
   height: 0.6,
   width: double.infinity,
   child: DecoratedBox(decoration: BoxDecoration(color: MyColours.line)),
 );

  // static const Widget line = Divider();

  static const Widget vLine = SizedBox(
    width: 0.6,
    height: 24.0,
    child: VerticalDivider(),
  );
  
  static const Widget empty = SizedBox.shrink();

  /// 补充一种空Widget实现 https://github.com/letsar/nil
  /// https://github.com/flutter/flutter/issues/78159
}
